DC.front.EditorTabPanel = function(config) {
	var tabPanel = this;
	var home_panel = new DC.front.HomePagePanel();
	DC.front.EditorTabPanel.superclass.constructor.call(this, Ext.apply({
		id: 'editor_tabPanel',
		margins: '-1 -1 -1 -1',
		cmargins: '0 0 0 0',
		border: true,
		bodyBorder : false,
		region: 'center',
		resizeTabs:true,
        tabWidth:120,
        minTabWidth: 120,
        enableTabScroll: true,
        activeTab: 0,
		items: [ home_panel/*{
			id: 'editor_tabPanel_homePage',
            title:'Home',
            iconCls: 'welcome_icon',
            hideMode:'offsets',
            loadMask: false,
            closable: false,
            layout: 'fit',
            html: '<iframe id=iframe-index name="ifm" src="././view/homepage.jsp" frameborder="0" scrolling="auto" width="100%" height="100%"></iframe>'
		}*/],
		listeners:{
            remove:function() {
            	this.closeActiveTab();
            }
        }
    }, config ||{}));
};

Ext.extend(DC.front.EditorTabPanel, Ext.TabPanel, {
	addTab: function(params) { // 添加tab页时触发的事件
		var _isExist = this.getItem(params.id);
        if(_isExist) {
            this.setActiveTab(_isExist);
        } else {
            this.add(params.panel);
            this.setActiveTab(params.panel);
            DC.front.variable.SYS_TABPANEL_NUM = DC.front.variable.SYS_TABPANEL_NUM + 1; //当添加tab页时将tab页的数量加1
        }
	},
	closeActiveTab: function() { // 关闭活动tab页时触发的事件
		DC.front.variable.SYS_TABPANEL_NUM = DC.front.variable.SYS_TABPANEL_NUM - 1; //当删除当前tab页时将tab页的数量减1
	},
	closeTabs: function() {
    	
    }
});